#ifndef EXPENSE_H
#define EXPENSE_H

#include <QObject>

class Expense : public QObject
{
    Q_OBJECT

    Q_PROPERTY(QString descr READ descr WRITE setDescr NOTIFY descrChanged)
    Q_PROPERTY(QString amnt READ amnt WRITE setAmnt NOTIFY amntChanged)
    Q_PROPERTY(QString crncy READ crncy WRITE setCrncy NOTIFY crncyChanged)
    Q_PROPERTY(QString payer READ payer WRITE setPayer NOTIFY payerChanged)
    Q_PROPERTY(QString date READ date WRITE setDate NOTIFY dateChanged)
    Q_PROPERTY(QString time READ time WRITE setTime NOTIFY timeChanged)
    Q_PROPERTY(QString split READ split WRITE setSplit NOTIFY splitChanged)

public:
    Expense(QObject *parent=0);
    Expense(const QString &descr, const QString &amnt, QObject *parent=0);

    QString descr() const;
    void setDescr(const QString &descr);

    QString amnt() const;
    void setAmnt(const QString &amnt);

    QString crncy() const;
    void setCrncy(const QString &crncy);

    QString payer() const;
    void setPayer(const QString &payer);

    QString date() const;
    void setDate(const QString &date);

    QString time() const;
    void setTime(const QString &time);

    QString split() const;
    void setSplit(const QString &split);

signals:
    void descrChanged();
    void amntChanged();
    void crncyChanged();
    void payerChanged();
    void dateChanged();
    void timeChanged();
    void splitChanged();

private:
    QString m_descr;
    QString m_amnt;
    QString m_crncy;
    QString m_payer;
    QString m_date;
    QString m_time;
    QString m_split;
};

#endif // EXPENSE_H
